package com.lxmes.pm.service.impl;

import java.util.List;
import com.lxmes.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.lxmes.pm.mapper.AOutlayProjectMapper;
import com.lxmes.pm.domain.AOutlayProject;
import com.lxmes.pm.service.IAOutlayProjectService;

/**
 * 经费科目管理Service业务层处理
 * 
 * @author zhangzhiyu
 * @date 2023-04-04
 */
@Service
public class AOutlayProjectServiceImpl implements IAOutlayProjectService 
{
    @Autowired
    private AOutlayProjectMapper aOutlayProjectMapper;

    /**
     * 查询经费科目管理
     * 
     * @param id 经费科目管理主键
     * @return 经费科目管理
     */
    @Override
    public AOutlayProject selectAOutlayProjectById(Long id)
    {
        return aOutlayProjectMapper.selectAOutlayProjectById(id);
    }

    /**
     * 查询经费科目管理列表
     * 
     * @param aOutlayProject 经费科目管理
     * @return 经费科目管理
     */
    @Override
    public List<AOutlayProject> selectAOutlayProjectList(AOutlayProject aOutlayProject)
    {
        return aOutlayProjectMapper.selectAOutlayProjectList(aOutlayProject);
    }

    /**
     * 新增经费科目管理
     * 
     * @param aOutlayProject 经费科目管理
     * @return 结果
     */
    @Override
    public int insertAOutlayProject(AOutlayProject aOutlayProject)
    {
        aOutlayProject.setCreateTime(DateUtils.getNowDate());
        return aOutlayProjectMapper.insertAOutlayProject(aOutlayProject);
    }

    /**
     * 修改经费科目管理
     * 
     * @param aOutlayProject 经费科目管理
     * @return 结果
     */
    @Override
    public int updateAOutlayProject(AOutlayProject aOutlayProject)
    {
        aOutlayProject.setUpdateTime(DateUtils.getNowDate());
        return aOutlayProjectMapper.updateAOutlayProject(aOutlayProject);
    }

    /**
     * 批量删除经费科目管理
     * 
     * @param ids 需要删除的经费科目管理主键
     * @return 结果
     */
    @Override
    public int deleteAOutlayProjectByIds(Long[] ids)
    {
        return aOutlayProjectMapper.deleteAOutlayProjectByIds(ids);
    }

    /**
     * 删除经费科目管理信息
     * 
     * @param id 经费科目管理主键
     * @return 结果
     */
    @Override
    public int deleteAOutlayProjectById(Long id)
    {
        return aOutlayProjectMapper.deleteAOutlayProjectById(id);
    }
}
